package ru.dcsearch.indexer;

/***************************************************************************
 *   Created by TMC
 *   berechitai@gmail.com
 *
 *   This file is part of DC Indexer project
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 ***************************************************************************/


public class Prefs {

	private String hubAddress;
	private String hubPort;
	private String myNick;
	private String myPassword;
	private String myDesc;
	private String myIp;
	private Integer maxActiveConnections;

	public boolean ulstmyinfo	= true;
	public boolean ulstsort		= false;
	public boolean usrcmds		= false;
	
	public String p2pport;
	public String ulSlots;
	public String downloadDir;

	
	public Prefs() {
		
		hubAddress = "kino.local";
		hubPort = "411";
		
		myNick = "iTester";
		myPassword = "*";
		myDesc = "";
		
		myIp="10.5.3.151";
		
		p2pport = "1420";
		downloadDir = "lists/";

        maxActiveConnections = 3;
	}
	
	public String getMyhub() {
		
		return hubAddress;
		
	}
	
	public String getMyport() {
		
		return hubPort;
	}
	public Integer getP2PPort(int id) {
		
		return Integer.parseInt(p2pport) + id;
	}
	
	public String getMyIp() {
		
		return myIp;
	}
	
	public boolean IsEnabled (String param) {
		
		if (param.equals("keepalive"))
			return true;
		if (param.equals("ulstlogin"))
			return false;
		
		return false;
		
	}
	
	public String getMynick() {
		
		return myNick;
		
	}
	
	public String getMypass() {
		
		return myPassword;
		
	}
	
	public String getDesc() {
		
		return myDesc;
		
	}
	public String getUlSlots() {
		
		return ulSlots;
	}
	public String getDownloadDir() {
		
		return downloadDir;
	}
    public Integer getMaxActiveConnections() {
        return maxActiveConnections;

    }
	
}
